InfoCallback(event)
Callback called by modelit.webserver.Server object for generating a simple HTML response.
event | modelit.webserver.HttpExchange | with the request data and methods to generate a response. |
No output, a response with a simple HTML string with the current time is returned.
server = modelit.web.server.Server('localhost', 8081, @InfoCallback).start() % Open a webbrowser and type: http://localhost:8081 in the address bar % Now a string with the current time appears in the browser.